import { RouteConfig } from "vue-router";
import Account from '@/pages/user/account.vue';
import Home from '@/pages/user/home.vue';
import Invite from '@/pages/user/invite.vue';
import WithdrawApply from '@/pages/user/withdrawApply.vue';
import Mobile from '@/pages/user/mobile.vue';
import WechatService from '@/pages/user/wechatService.vue';
import AccountEdit from '@/pages/user/accountEdit.vue';
import WithdrawOrder from '@/pages/user/withdrawOrder.vue';
import { ROUTE_NAME } from "@/lib/constant";

export const routes: RouteConfig[] = [
    {
        path: '/user/account',
        name: ROUTE_NAME.USER_ACCOUNT,
        meta: {
            title: '我的账户',
        },
        component: Account,
    },
    {
        path: '/user/home',
        name: ROUTE_NAME.USER_HOME,
        meta: {
            title: '个人中心',
        },
        component: Home,
    },
    {
        path: '/user/invite',
        name: ROUTE_NAME.USER_INVITE,
        meta: {
            title: '我的邀请',
        },
        component: Invite,
    },
    {
        path: '/user/withdraw_apply',
        name: ROUTE_NAME.USER_WITHDRAW_APPLY,
        meta: {
            title: '提现',
        },
        component: WithdrawApply,
    },
    {
        path: '/account/edit/:accountId?',
        name: ROUTE_NAME.USER_ACCOUNT_EDIT,
        meta: {
            title: '银行卡',
        },
        component: AccountEdit,
    },
    {
        path: '/user/mobile',
        name: ROUTE_NAME.USER_MOBILE,
        meta: {
            title: '修改个人手机号',
        },
        component: Mobile,
    },
    {
        path: '/user/wechat_service',
        name: ROUTE_NAME.USER_WECHAT_SERVICE,
        meta: {
            title: '微信客服',
        },
        component: WechatService,
    },
    {
        path: '/user/withdraw_order/:withdrawDetailId',
        name: ROUTE_NAME.USER_WITHDRAW_ORDER,
        meta: {
            title: '返利订单',
        },
        component: WithdrawOrder,
    },
];
